<?php

require_once './core/tools.php';

if (isset($_POST["id_swf"]) && isset($_POST["title"]) && isset($_POST["major"]) && isset($_POST["minor"]) && isset($_POST["build"]) ){

	$query = "UPDATE versions_swf SET name='".$_POST["title"]."', major='".$_POST["major"]."', minor='".$_POST["minor"]."', build='".$_POST["build"]."' WHERE id_swf='".$_POST["id_swf"]."'";
	$result = executeSQL($query);
	if (!$result){
		die ('{"error":1, "message":"MysqlError :'.addslashes(mysql_error()).'"}' );
	}
			
	echo '{"error":0, "message":"OK"}';
}
else {
	echo '{"error":2, "message":"missing parameters"}';
}


?>


